﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;
using PUCP.SI2.SGIRP.BE;

namespace PUCP.SI2.SGIRP.DA
{
    public class DAOCC
    {
        public void addCC(CentroComercialBE cc)
        {
            MySqlConnection conn = new coneccion().getInstance();
            conn.Open();

            MySqlCommand command = new MySqlCommand("INSERT into centro_comercial (nombre, abreviatura, areaArrendable, areaTotal,"+
                "direccion, departamento, provincia, distrito, telefono, numNiveles, fecApertura, observaciones)"+
                "VALUES ("+cc.Nombre+","+cc.Abreviatura+","+cc.AreaArrendable+","+cc.AreaTotal+","+cc.Direccion+","+cc.Provincia+","+cc.Distrito+
            ","+cc.Telefono+","+cc.NumeroNiveles+","+cc.FechaApertura+","+cc.Observaciones, conn);
            command.ExecuteNonQuery();
            conn.Clone();
        }
    }
}
